SetMovieBox
TheSetMovieBox
function sets a movie's boundary rectangle, or movie box, which is a rectangle that encompasses the spatial representation of all of the movie's enabled tracks. The movie box is in the display coordinate system.
pascal void SetMovieBox (Movie theMovie, const Rect *boxRect);
theMovie
- Specifies the movie for this operation. Your application obtains this movie identifier from such functions as
NewMovie
,NewMovieFromFile
, andNewMovieFromHandle
(described on page 2-80, page 2-76, and page 2-78, respectively).boxRect
- Contains a pointer to a rectangle that contains the coordinates of the new boundary rectangle.
DESCRIPTION
The Movie Toolbox changes the rectangle by modifying the translation and scale values of the movie's matrix to accommodate the new boundary rectangle.The movie box might not have its upper-left corner set at (0,0) in its display window when the movie is first loaded. Consequently, your application may need to adjust the position of the movie box so that it appears in the appropriate location within your application's document window. If you don't reset the movie position, the movie might not be visible when it starts playing.
The following sample code demonstrates how to move the boundary rectangle.
GetMovieBox (movie, &movieBox); OffsetRect (&movieBox, -movieBox.left, -movieBox.top); SetMovieBox (movie, &movieBox);SPECIAL CONSIDERATIONS
TheSetMovieBox
function does not call your cover functions.ERROR CODES
Memory Manager errors
invalidMovie -2010 This movie is corrupted or invalid SEE ALSO
You can modify the movie's matrix directly by calling theSetMovieMatrix
function, which is described on page 2-155. You can retrieve a movie's boundary rectangle by calling theGetMovieBox
function, which is described in the next section.